package com.itheima.bankservice.mapper;



import com.itheima.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: 祺诺
 * @Name; xqf
 * @Date: 2021/3/11 18:50
 */
@Mapper
@Repository
public interface UserMapper {
    @Insert("Insert into user value(#{username},#{password})")
    void save(User user);
    @Select("select * from user")
    List<User> findAll();
    @Select("select * from user where username = #{username} and password = #{password}")
    User findByUsernameAndPassword(User user);

}
